import mysql from 'mysql'
const connect = mysql.createConnection({
    host: process.env.NODE_BASE_MYSQL_URL,
    user: process.env.NODE_BASE_MYSQL_USER,
    password: process.env.NODE_BASE_MYSQL_PASSWORD,
    database: process.env.NODE_BASE_MYSQL_DATABASE
})

connect.connect((error: any) => {
    if (error) throw error
    console.log('连接成功')
})

export default connect